package genetics;

import java.util.Random;

/**
 * Crossover function interface.
 * @author pcdejager
 */
public interface CrossoverFunction {
    /**
     * Do a crossover of two gene values.
     * @param random The random number generator to use
     * @param parent1 Parent one
     * @param parent2 Parent two
     * @param size The size of the gene
     * @return The resulting gene
     */
    int crossover(Random random, int parent1, int parent2, int size);
}
